home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Sound / LAME / WarpOS / src / acinclude.m4 < prev    next >
Encoding:
M4 Source File  |  2001-02-05  |  2.4 KB  |  86 lines

  1. dnl acinclude.m4. Change *this* file to add new or change macros.
  2. dnl When changes have been made, delete aclocal.m4 and run
  3. dnl "aclocal".
  4. dnl
  5. dnl DO NOT change aclocal.m4 !
  6. dnl
  7.  
  8. dnl * LA_SEARCH_FILE(variable, filename, PATH)
  9. dnl * Search "filename" in the specified "PATH", "variable" will 
  10. dnl * contain the full pathname or the empty string
  11. dnl * PATH is space-separated list of directories.
  12. dnl * by Florian Bomers
  13.  
  14. AC_DEFUN(LA_SEARCH_FILE,[
  15.   $1=
  16.   dnl hack: eliminate line feeds in $2
  17.   for FILE in $2; do
  18.     for DIR in $3; do
  19.       dnl use PATH in order
  20.       if test ".$1"="." && test -f "$DIR/$FILE"; then
  21.         $1=$DIR
  22.       fi
  23.     done
  24.   done
  25. ])
  26.  
  27. dnl * LA_SEARCH_LIB(lib-variable, include-variable, lib-filename, header-filename, prefix)
  28. dnl * looks for "lib-filename" and "header-filename" in the area of "prefix".
  29. dnl * if found, "lib-variable" and "include-variable" are set to the
  30. dnl * respective paths.
  31. dnl * prefix is a single path
  32. dnl * libs are searched in prefix, prefix/lib, prefix/.., prefix/../lib
  33. dnl * headers are searched in prefix, prefix/include, prefix/.., prefix/../include
  34. dnl * 
  35. dnl * If one of them is not found, both "lib-variable", "include-variable" are 
  36. dnl * set to the empty string.
  37. dnl *
  38. dnl * TODO: assert function call to verify lib
  39. dnl *
  40. dnl * by Florian Bomers
  41.  
  42. AC_DEFUN(LA_SEARCH_LIB,[
  43.   dnl look for lib
  44.   LA_SEARCH_FILE($1, $3, $5 $5/lib $5/.. $5/../lib)
  45.   dnl look for header.
  46.   LA_SEARCH_FILE($2, $4, $5 $5/include $5/.. $5/../include)
  47.   if test ".$1" = "." || test ".$2" = "."; then
  48.     $1=
  49.     $2=
  50.   fi
  51. ])
  52.  
  53.  
  54.  
  55.  
  56. # alex_IEEE854_FLOAT80
  57. # ------------
  58. AC_DEFUN(alex_IEEE854_FLOAT80,
  59. [AC_CACHE_CHECK(for IEEE854 compliant 80 bit floats, alex_cv_ieee854_float80,
  60. [AC_TRY_RUN([
  61. int   float2long_IEEE_compliance ( void )
  62. {
  63.     float  f;
  64.     f = 12582912.; if ( *(long*)(&f) != 1262485504l ) return 0;
  65.     f = 12615679.; if ( *(long*)(&f) != 1262518271l ) return 0;
  66.     f = 13582912.; if ( *(long*)(&f) != 1263485504l ) return 0;
  67.     f = 12550145.; if ( *(long*)(&f) != 1262452737l ) return 0;
  68.     f = 11582912.; if ( *(long*)(&f) != 1261485504l ) return 0;
  69.     return 1;
  70. }
  71.  
  72. int main(void)
  73. {
  74.     int retval;
  75.  
  76.     retval = float2long_IEEE_compliance();
  77.  
  78.     /* no error return -> success */
  79.     return !retval;
  80. }
  81. ], alex_cv_ieee854_float80=yes, alex_cv_ieee854_float80=no,
  82. [AC_MSG_WARN(can't check for IEEE854 compliant 80 bit floats)]
  83. )])]) # alex_IEEE854_FLOAT80
  84.  
  85.  
  86.